]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lint: Tweak the whitelist of globals
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 27 Jan 2019 00:15:31 +0000 (01:15 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 12 Jul 2019 16:01:07 +0000 (16:01 +0000)
gjs doesn't include any gettext wrappers, and obviously can't know
about the shell's global object, so include those in the list of
globals for all sources in the gnome-shell context.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609

.eslintrc.json
lint/eslintrc-shell.json [new file with mode: 0644]

index 255b0f2f8f642520e1a2940d96726e27ccad2984..30afb5924ec4a217cd2932bdfb72afbfb45f98d7 100644 (file)
@@ -1,5 +1,6 @@
 {
     "extends": [
-        "./lint/eslintrc-gjs.json"
+        "./lint/eslintrc-gjs.json",
+        "./lint/eslintrc-shell.json"
     ]
 }
diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json
new file mode 100644 (file)
index 0000000..f59417c
--- /dev/null
@@ -0,0 +1,15 @@
+{
+    "overrides": [
+        {
+            "files": "js/**",
+            "excludedFiles": ["js/extensionPrefs/*", "js/portalHelper/*"],
+            "globals": {
+                "global": false,
+                "_": false,
+                "C_": false,
+                "N_": false,
+                "ngettext": false
+            }
+        }
+    ]
+}